<?php 

class _F_EXTENSION_TEST_ extends _F_EXTENSION_ {
	
	public $prev_route;

	public function __construct() {
//		$dir = dirname(__FILE__);
//		require_once $dir.'/user.model.php';
		$this->prev_route = f()->register_method(
			'route',array($this,'route'));		
	}

	public function route() {
		$r = f()->request;
		if ($r === '/test' || strpos($r,'/test/') === 0) {
			f()->_f_route_(substr($r,6),'/extensions/test/actions');
		} else {
			call_user_func($this->prev_route);
		}
	}

}

new _F_EXTENSION_TEST_();
